home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / QuickDraw GX / QuickDraw GX Info / QuickDraw GX Interfaces / Interfaces & Libraries / Pascal Interfaces & Libraries / Pascal Interfaces / GraphicsDebugging.p < prev    next >
Encoding:
Text File  |  1994-04-02  |  4.8 KB  |  160 lines  |  [TEXT/MPS ]

  1. {
  2.  graphics:
  3.     debugging routines
  4.     by Cary Clark, Georgiann Delaney, Michael Fairman, Dave Good, Robert Johnson, Keith McGreggor, Oliver Steele, David Van Brink, Chris Yerga
  5.     Copyright 1987 - 1993 Apple Computer, Inc.  All rights reserved.    
  6. }
  7.  
  8. {$IFC UNDEFINED UsingIncludes}
  9. {$SETC UsingIncludes := 0}
  10. {$ENDC}
  11.  
  12. {$IFC NOT UsingIncludes}
  13.     UNIT GraphicsDebugging;
  14.     INTERFACE
  15. {$ENDC}
  16.  
  17. {$IFC UNDEFINED UsingGraphicsDebugging}
  18. {$SETC UsingGraphicsDebugging := 1}
  19.  
  20.  
  21. {$I+}
  22. {$SETC GraphicsDebuggingIncludes := UsingIncludes}
  23. {$SETC UsingIncludes := 1}
  24. {$IFC UNDEFINED UsingGraphicsTypes}
  25. {$I $$Shell(PInterfaces)GraphicsTypes.p}
  26. {$ENDC}
  27. {$IFC UNDEFINED UsingMathTypes}
  28. {$I $$Shell(PInterfaces)MathTypes.p}
  29. {$ENDC}
  30. {$SETC UsingIncludes := GraphicsDebuggingIncludes}
  31.  
  32.  
  33. { Validation Constants and Types }
  34. CONST
  35.     { These tell what routines to validate. Choose one: }
  36.     gxNoValidation                 = 0;    { No Validation }
  37.     gxPublicValidation            = 1;    { Validate Public API Calls }
  38.     gxInternalValidation        = 2;    { Validate internal calls also }
  39.     
  40.     { These tell what level of validation to perform on objects. Choose one: }
  41.     gxTypeValidation            = 0;
  42.     gxStructureValidation        = 16;
  43.     gxAllObjectValidation        = 32;
  44.     
  45.     { These tell how to validate memory manager blocks. Choose any combination: }
  46.     gxNoMemoryManagerValidation    = 0;
  47.     gxApBlockValidation            = 256;
  48.     gxFontBlockValidation        = 512;
  49.     gxApHeapValidation            = 1024;
  50.     gxFontHeapValidation        = 2048;
  51.     gxCheckApHeapValidation        = 4096;
  52.     gxCheckFontHeapValidation    = 8192;
  53.  
  54.  
  55. TYPE
  56.     GxValidationLevel = LongInt;
  57.  
  58.  
  59. { DrawError Constants and Types }
  60. CONST
  61.     no_draw_error                    = 1;
  62.     shape_emptyType                    = 2;
  63.     shape_inverse_fullType            = 3;
  64.     rectangle_zero_width            = 4;
  65.     rectangle_zero_height            = 5;
  66.     polygon_empty                    = 6;
  67.     path_empty                        = 7;
  68.     bitmap_zero_width                = 8;
  69.     bitmap_zero_height                = 9;
  70.     text_empty                        = 10;
  71.     glyph_empty                        = 11;
  72.     layout_empty                    = 12;
  73.     picture_empty                    = 13;
  74.     shape_no_fill                    = 14;
  75.     shape_no_enclosed_area            = 15;
  76.     shape_no_enclosed_pixels        = 16;
  77.     shape_very_small                = 17;
  78.     shape_very_large                = 18;
  79.     shape_contours_cancel            = 19;
  80.     pen_too_small                    = 20;
  81.     text_size_too_small                = 21;
  82.     dash_empty                        = 22;
  83.     start_cap_empty                    = 23;
  84.     pattern_empty                    = 24;
  85.     textFace_empty                    = 25;
  86.     shape_primitive_empty            = 26;
  87.     shape_primitive_very_small        = 27;
  88.     transfer_equals_noMode            = 28;
  89.     transfer_matrix_ignores_source    = 29;
  90.     transfer_matrix_ignores_device    = 30;
  91.     transfer_source_reject            = 31;
  92.     transfer_mode_ineffective        = 32;
  93.     colorSet_no_entries                = 33;
  94.     bitmap_colorSet_one_entry        = 34;
  95.     transform_scale_too_small        = 35;
  96.     transform_map_too_large            = 36;
  97.     transform_move_too_large        = 37;
  98.     transform_scale_too_large        = 38;
  99.     transform_rotate_too_large        = 39;
  100.     transform_perspective_too_large    = 40;
  101.     transform_skew_too_large        = 41;
  102.     transform_clip_no_intersection    = 42;
  103.     transform_clip_empty            = 43;
  104.     transform_no_viewPorts            = 44;
  105.     viewPort_disposed                = 45;
  106.     viewPort_clip_empty                = 46;
  107.     viewPort_clip_no_intersection    = 47;
  108.     viewPort_scale_too_small        = 48;
  109.     viewPort_map_too_large            = 49;
  110.     viewPort_move_too_large            = 50;
  111.     viewPort_scale_too_large        = 51;
  112.     viewPort_rotate_too_large        = 52;
  113.     viewPort_perspective_too_large    = 53;
  114.     viewPort_skew_too_large            = 54;
  115.     viewPort_viewGroup_offscreen    = 55;
  116.     viewDevice_clip_no_intersection    = 56;
  117.     viewDevice_scale_too_small        = 57;
  118.     viewDevice_map_too_large        = 58;
  119.     viewDevice_move_too_large        = 59;
  120.     viewDevice_scale_too_large        = 60;
  121.     viewDevice_rotate_too_large        = 61;
  122.     viewDevice_perspective_too_large = 62;
  123.     viewDevice_skew_too_large        = 63;
  124.  
  125. TYPE
  126.     GxDrawError = LongInt;
  127.  
  128.     GxUserDebugFunction = ProcPtr;
  129.  
  130.  
  131. FUNCTION GXGetShapeDrawError(source: GxShape): GxDrawError; C;
  132.  
  133. PROCEDURE GXValidateAll; C;
  134. PROCEDURE GXValidateColorSet(aGxColorSet: GxColorSet); C;
  135. PROCEDURE GXValidateColorProfile(aGxColorProfile: GxColorProfile); C;
  136. PROCEDURE GXValidateGraphicsClient(aGxGraphicsClient: GxGraphicsClient); C;
  137. PROCEDURE GXValidateInk(aGxInk: GxInk); C;
  138. PROCEDURE GXValidateShape(aGxShape: GxShape); C;
  139. PROCEDURE GXValidateStyle(aGxStyle: GxStyle); C;
  140. PROCEDURE GXValidateTag(aGxTag: GxTag); C;
  141. PROCEDURE GXValidateTransform(aGxTransform: GxTransform); C;
  142. PROCEDURE GXValidateViewDevice(aGxViewDevice: GxViewDevice); C;
  143. PROCEDURE GXValidateViewPort(aGxViewPort: GxViewPort); C;
  144. PROCEDURE GXValidateViewGroup(aGxViewGroup: GxViewGroup); C;
  145.  
  146. FUNCTION GXGetValidation: GxValidationLevel; C;
  147. PROCEDURE GXSetValidation(aGxValidationLevel: GxValidationLevel); C;
  148.  
  149. FUNCTION GXGetValidationError(VAR procedureName: SignedByte; VAR argument: Ptr; VAR argumentNumber: LongInt): LongInt; C;
  150. FUNCTION GXGetGraphicsBugParametersPointer(VAR graphicsBugParameters: Ptr): Boolean; C;
  151. FUNCTION GXGetUserGraphicsDebug(VAR reference: LongInt): GxUserDebugFunction; C;
  152. PROCEDURE GXSetUserGraphicsDebug(userFunction: GxUserDebugFunction; reference: LongInt); C;
  153.  
  154.  
  155. {$ENDC}
  156.  
  157. {$IFC NOT UsingIncludes}
  158.     END.
  159. {$ENDC}
  160.